<template>
  <view>
    <view class="ikz-head">
      <view class="ikz-head-user">
        <image class="ikz-head-user-img" :src="userInfo.avatar"></image>
        <view class="ikz-head-user-right">
          <view class="ikz-head-user-title">
            {{userInfo.nickname}}
          </view>
          <view class="ikz-head-user-card">
            <image class="ikz-head-user-card-img" src="/static/receiver/icon.png"></image>
            <view class="ikz-head-user-card-title" v-if="status==3">校园代理</view>
            <view class="ikz-head-user-card-title" v-else>接单员</view>
          </view>
        </view>
      </view>
      <view class="ikz-head-price">
        <view class="ikz-head-price-item ikz-head-price-line" @click="gobalance">
          <view class="ikz-head-price-num">
            ￥{{showData.total_income}}
          </view>
          <view class="ikz-head-price-title">
            总收入
          </view>
          <view class="ikz-head-price-card">
            明细
          </view>
        </view>
        <view class="ikz-head-price-item ikz-head-price-line">
          <view class="ikz-head-price-num">
            ￥{{showData.today_income}}
          </view>
          <view class="ikz-head-price-title">
            今日收入
          </view>
        </view>
        <view class="ikz-head-price-item" @click="gowithdrawal">
          <view class="ikz-head-price-num">
            ￥{{showData.can_withdrawal_amount}}
          </view>
          <view class="ikz-head-price-title">
            可提现金额
          </view>
          <view class="ikz-head-price-card">
            提现
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  var app = getApp();
  import ikz from '@/pages/Common/tools';
  export default {
    name: 'login',
    props: {
      showData: {
        type: Object
      },
	  userInfo:{
		  type: Object
	  },
      status:{
        type:String
      }
    },
    components: {
     
    },
    data() {
      return {
        cssInfo: {},
        thrd_session: uni.getStorageSync('local_user_session'),
        user_openinfo: app.globalData.user_openinfo,
		
      };
    },
    watch: {
      showData: {
        handler(newName, oldName) {},
        immediate: true,
        deep: true
      },
      cssData: {
        handler(newName, oldName) {},
        immediate: true,
        deep: true
      }
    },

    mounted() {
	  
    },
    methods: {
      returnUserInfo(e) {
        this.user_openinfo = e;
      },
      gobalance(){
        uni.navigateTo({
          url:'/pages/Component/Module/Payment/Program/balance/log/index?status='+this.status
        })
      },
      gowithdrawal(){
        uni.navigateTo({
          url:'/pages/Component/Module/Payment/Program/withdrawal/index/index?status='+this.status
        })
      },
	  	
    }
  };
</script>

<style scoped>
  .ikz-head {
    width: 100%;
    box-sizing: border-box;
    background: #F8C66D;
  }

  .ikz-head-user {
    box-sizing: border-box;
    padding: 70rpx;
    display: flex;
    align-items: center
  }

  .ikz-head-user-img {
    width: 150rpx;
    height: 150rpx;
    border-radius: 50%;
  }

  .ikz-head-user-right {
    margin-left: 30rpx;
  }

  .ikz-head-user-title {
    margin-bottom: 20rpx;
    font-weight: 600;
  }

  .ikz-head-user-card {
    box-sizing: border-box;
    padding: 15rpx 20rpx;
    display: flex;
    align-items: center;
    color: #fff;
    background: #333333;
    border-radius: 50rpx;
    font-size: 26rpx;
  }

  .ikz-head-user-card-img {
    width: 30rpx;
    height: 30rpx;
    margin-right: 15rpx;
  }

  .ikz-head-price {
    box-sizing: border-box;
    padding: 0px 40rpx 40rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: 50rpx;
  }

  .ikz-head-price-item {
    position: relative;
    width: 33%;
  }

  .ikz-head-price-line {
    border-right: 1px solid #000;
  }

  .ikz-head-price-num {
    width: 100%;
    text-align: center;
    font-weight: 600;
  }

  .ikz-head-price-title {
    width: 100%;
    text-align: center;
  }

  .ikz-head-price-card {
    box-sizing: border-box;
    padding: 0px 25rpx;
    position: absolute;
    top: -40rpx;
    right: 20%;
    font-size: 25rpx;
    background: #333;
    color: #fff;
    border-radius: 30rpx;
    border-bottom-left-radius: 0px;
    line-height: 35rpx;
  }
</style>
